import { request } from '@umijs/max';



//通用规则
export async function creatLgExtrasDict(params: any): Promise<BackendResponse<any>> {
    let url ='/admin-api/system/extras/create';
    return request(url, {
        method: 'POST',
        data: params,
    });
}

export async function getLgExtrasDictById(id: string): Promise<BackendResponse<any>> {
    let url =`/admin-api/system/extras/get/${id}`;
    return request(url, {
        method: 'GET'
    });
}


export async function updateLgExtrasDict(id:string,params: any): Promise<BackendResponse<any>> {
    let url =`/admin-api/system/extras/update/${id}`;
    return request(url, {
        method: 'PUT',
        data: params,
    });
}



export async function pageListLgExtrasDict(params: any): Promise<BackendResponse<any>> {
    let url ='/admin-api/system/extras/page_list';
    return request(url, {
        method: 'POST',
        data: params,
    });
}

export async function deleteLgExtrasDict(id: string): Promise<BackendResponse<any>> {
    let url =`/admin-api/system/extras/delete/${id}`;
    return request(url, {
        method: 'DELETE'
    });
}

export async function listLgExtrasDict(params: any): Promise<BackendResponse<any>> {
    let url ='/admin-api/system/extras/list';
    return request(url, {
        method: 'POST',
        data: params,
    });
}
